package com.day1013.morning;

public class MainText {
    public static void main(String[] args) {
        Thread main = Thread.currentThread();
        System.out.println("主线程优先级：" + main.getPriority());
        Thread myThread = new Thread();
        System.out.println("子线程优先级：" + myThread.getPriority());
        System.out.println("开始设置优先级：");
        main.setPriority(10);
        myThread.setPriority(1);
        System.out.println("设置后的优先级：");
        System.out.println("主线程" + main.getPriority());
        System.out.println("子线程" + myThread.getPriority());
    }
}
